<!DOCTYPE html>
<html>
<!--STATUS OK-->
<head>


<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta charset="utf-8" />
<title>
Centos如何设置IP地址,LINUX怎么修改IP地址_百度经验</title>

<meta name="keywords" content='Centos如何设置IP地址,LINUX怎么修改IP地址,centosiplinuxip,互联网,游戏/数码'/>


<meta name="description" content="Centos如何设置IP地址,LINUX怎么修改IP地址,对于很多刚刚接触liux的朋友来说，如何设置liux系统的IP地址，作为第一步，下面小编以ceto系统为例，给大家演示如何给ceto设置IP地址，如何修改liux系统IP地址？"/>



<script>(function(){window.PDC={_timing:{},_opt:{sample:0.01},_analyzer:{loaded:false,url:"http://static.tieba.baidu.com/tb/pms/wpo.pda.js?v=2.9",callbacks:[]},_render_start:+new Date,extend:function(b,a){for(property in b){a[property]=b[property]}return a},metadata:function(){var c=this._opt;var e={env:{user:(c.is_login==true?1:0),product_id:c.product_id,page_id:PDC._is_sample(c.sample)?c.page_id:0},render_start:this._render_start,timing:this._timing};
            var a=[];var d=c.special_pages||[];for(var b=0;b<d.length;b++){if(PDC._is_sample(d[b]["sample"])){a.push(d[b]["id"])}}if(a.length>0){e.env["special_id"]="["+a.join(",")+"]"}return e},init:function(a){this.extend(a,this._opt)},mark:function(a,b){this._timing[a]=b||+new Date},view_start:function(){this.mark("vt")},tti:function(){this.mark("tti")},page_ready:function(){this.mark("fvt")},first_screen:function(){var b=document.getElementsByTagName("img"),g=document.getElementsByTagName("IFRAME"),c=+new Date;
            var j=[],e=this;function f(i){var l=0;l=window.pageYOffset?window.pageYOffset:document.documentElement.scrollTop;try{l+=i.getBoundingClientRect().top}catch(k){}finally{return l}}this._setFS=function(){var m=e._opt["fsHeight"]||document.documentElement.clientHeight;for(var l=0;l<j.length;l++){var n=j[l],k=n.img,p=n.time,o=f(k);if(o>0&&o<m){c=p>c?p:c}}e._timing.fs=c};var h=function(){if(this.removeEventListener){this.removeEventListener("load",h,false)}j.push({img:this,time:+new Date})};
            for(var a=0;a<b.length;a++){(function(){var i=b[a];if(i.addEventListener){!i.complete&&i.addEventListener("load",h,false)}else{if(i.attachEvent){i.attachEvent("onreadystatechange",function(){if(i.readyState=="complete"){h.call(i,h)}})}}})()}for(var a=0,d=g.length;a<d;a++){(function(){var i=g[a];if(i.attachEvent){i.attachEvent("onload",function(){h.call(i,h)})}else{i.addEventListener("load",h,false)}})()}}};if(document.attachEvent){window.attachEvent("onload",function(){PDC.mark("let");
            PDC._setFS&&PDC._setFS();PDC._opt.ready!==false&&PDC._load_analyzer()})}else{window.addEventListener("load",function(){PDC.mark("lt")},false)}})();</script>
<script type="text/javascript">
            !function(){var n={},t={};n.context=function(n,e){var i=arguments.length;if(i>1)t[n]=e;else if(1==i){if("object"!=typeof n)return t[n];for(var o in n)n.hasOwnProperty(o)&&(t[o]=n[o])}},"F"in window||(window.F=n)}();;
        </script>
<!--[if lt IE 9]>
<script type="text/javascript" src="/static/common/tool/html5.js"></script>
<![endif]-->

<script type="text/javascript">
	var arrBaiduAds = [],bdAdsPrefix = '___bd_ads__',effBaiduAds = [];
	function BaiduAdsDisplay(index, wrapId) {
		if(typeof(arrBaiduAds[index])!="undefined" && arrBaiduAds[index]!=""){
			//包裹一层广告标记位,用于分成经验用户点击广告次数统计
			effBaiduAds.push(index);
			//return '<div id="'+ bdAdsPrefix + index + '">' + arrBaiduAds[index] + '</div>';
			document.write('<div id="'+ bdAdsPrefix + index + '">' + arrBaiduAds[index] + '</div>');
		}
	}
</script>

<link rel="stylesheet" type="text/css" href="http://exp.bdstatic.com/static/common/pkg/common_f4c43b5.css"/><link rel="stylesheet" type="text/css" href="http://exp.bdstatic.com/static/article/pkg/article_2326a1f.css"/></head>
<script>PDC.mark("ht");</script>
<body>

<script type="text/javascript">
	var screen_width = parseInt(window.screen.width);
	if(screen_width < 1200){
		document.write('<div class="small-screen">');
	}else{
		document.write('<div class="wide-screen">');
	}
</script>

<header class="header">

<div id="usrbar" class="userbar">
<div class="my-info menu-hide"  onmouseover="this.className='my-info menu-show'"  onmouseout="this.className='my-info menu-hide'"><span>
<a href="http://www.baidu.com/p/%E7%8B%82%E7%83%ADCC?from=jingyan" target="_blank" id="username" class="g-un" enable="false">
狂热CC
<img align="absmiddle" src="http://img.baidu.com/hi/img/mfu/my_ico.gif"></a>
</span>
<div class="dropdown-menu" >
<a href="http://www.baidu.com/p/%E7%8B%82%E7%83%ADCC?from=jingyan" target="_blank" id="user-my-home" >我的主页</a>
<a href="http://passport.baidu.com/center" target="_blank" id="username" >帐号设置</a>
<a href="http://passport.baidu.com/?logout&aid=7&u=http://jingyan.baidu.com" id="usrbar-logout">退出</a>
</div>
</div>&nbsp;|&nbsp;<span>
<a id="my-home-exp" href="/user/nuc/expList" target="_blank" log="type:100,pos:usrbar">我的经验</a>
</span>&nbsp;|&nbsp;<span>
<a id="my-income" href="/user/nuc/income" target="_blank">我的收入</a>
</span>&nbsp;|&nbsp;<span id="mnum"></span>&nbsp;|&nbsp;<span><a href="http://www.baidu.com/" target="_blank">百度首页</a>&nbsp;</span>
</div>
<div id="top-search-box" class="top-search-box">
<div class="inner-warp">
<div class="s-nav">
<a class="logo" href="http://jingyan.baidu.com">
<img src="http://img.baidu.com/img/iknow/exp/logo_beta_normal.jpg" alt="百度经验" />
</a>
<ul class="channel">
<li><a href="http://news.baidu.com/" log="type:3100,menu:1" rel="nofollow">新闻</a></li>
<li><a href="http://www.baidu.com/"  log="type:3100,menu:2" rel="nofollow">网页</a></li>
<li><a href="http://tieba.baidu.com/" log="type:3100,menu:3" rel="nofollow">贴吧</a></li>
<li><a href="http://zhidao.baidu.com/" log="type:3100,menu:4">知道</a></li>
<li><strong>经验</strong></li>
<li><a href="http://music.baidu.com/" log="type:3100,menu:5" rel="nofollow">音乐</a></li>
<li><a href="http://image.baidu.com/" log="type:3100,menu:6" rel="nofollow">图片</a></li>
<li><a href="http://video.baidu.com/" log="type:3100,menu:7" rel="nofollow">视频</a></li>
<li><a href="http://map.baidu.com/" log="type:3100,menu:8" rel="nofollow">地图</a></li>
<li><a href="http://baike.baidu.com/" log="type:3100,menu:9" rel="nofollow">百科</a></li>
<li><a href="http://wenku.baidu.com/" log="type:3100,menu:10" rel="nofollow">文库</a></li>
</ul>
</div>
<form action="/search" name="top-search-form" method="get" id="top-search-form" class="top-search-form">
<div class="box">
<span class="s-ipt-wr">
<input x-webkit-speech x-webkit-grammar="bUIltin:search" class="hdi" id="kw" autoComplete="off" maxlength="256" tabindex="1" size="46" name="word" value='centos设置ip'/>
</span>
<span class="s-btn-wr">
<input type="submit" id="sb" value="搜索经验">
</span><span class="s-tools">
<a href="http://www.baidu.com/search/jingyan_help.html" target="_blank" rel="nofollow">帮助</a>
</span><div class="clear"></div>
</div>
</form>
</div>
</div>


</header>

<nav class="nav">
<div id="nav-wrap" class="nav-wrap">
<ul class="main-menu" alog-group="main-menu">
<li class="">
<a href="http://jingyan.baidu.com" log="type:3001,menu:1" target="_self">首页</a>
</li>
<li id="all-category-e" class="all-category">
<a href="javascript:void(0)" log="type:3001,menu:7" id="all-category-a-e" class="cat-flag">分类</a>
<span id="dir-icon-e" class="dir-icon cat-flag"></span>
</li>
<li class="">
<a href="http://jingyan.baidu.com/magazine/home" log="type:3001,menu:2" target="_blank">杂志</a>
</li>
<li class="">
<a href="http://jingyan.baidu.com/tasklist" target="_blank" log="type:3001,menu:3" rel="nofollow">任务</a>
</li>
<li class="">
<a href="http://jingyan.baidu.com/user/income" target="_blank" log="type:3001,menu:6" rel="nofollow">回享计划</a>
</li>
<li class="">
<a href="http://jingyan.baidu.com/manual" log="type:3001,menu:8" target="_blank">说明书</a>
</li>
<li class="">
<a href="http://jingyan.baidu.com/shop" log="type:3001,menu:9" target="_blank">商城</a>
</li>
<li class="last">
<a class="last" href="http://zhidao.baidu.com"  log="type:3001,menu:10"  target="_blank">知道</a>
</li>
</ul>
<a href="/edit/content" target="_blank" class="share-exp-e" id="share-exp-e" rel="nofollow"></a>
<ul class="category-list" id="category-list-e" style="display: none;">
<li class="first-line">
<a href="/list/1" target="_blank">美食/营养</a>
</li>
<li class="even first-line">
<a href="/list/10" target="_blank">游戏/数码</a>
</li>
<li>
<a href="/list/37" target="_blank">手工/爱好</a>
</li>
<li class="even">
<a href="/list/50" target="_blank">生活/家居</a>
</li>
<li>
<a href="/list/73" target="_blank">健康/养生</a>
</li>
<li class="even">
<a href="/list/86" target="_blank">运动/户外</a>
</li>
<li>
<a href="/list/93" target="_blank">职场/理财</a>
</li>
<li class="even">
<a href="/list/101" target="_blank">情感/交际</a>
</li>
<li class="last-line">
<a href="/list/108" target="_blank">母婴/教育</a>
</li>
<li class="even last-line">
<a href="/list/123" target="_blank">时尚/美容</a>
</li>
</ul>
</div>
</nav>

<section class="body-wrapper">

<div class="breadcrumb" id="breadcrumb">
<div class="bread-wrap" id="bread-wrap">
<a href="http://jingyan.baidu.com">百度经验</a>&nbsp;&gt;&nbsp;<a href="/list/10">游戏/数码</a>&nbsp;&gt;&nbsp;互联网
<p class="share-text">分享有回报：<a href="http://jingyan.baidu.com/user/income">昨日最高收入85元</a><span class="ico-money"></span></p>
</div>
</div>
<div class="content-container clearfix">
<div class="main-content" id="main-content">
<article id="exp-article" class="exp-article">
<div class="exp-title clearfix">
<h1 title="Centos如何设置IP地址,LINUX怎么修改IP地址">Centos如何设置IP地址,LINUX怎么修改IP地址</h1>
<ul class="exp-info">
<li>
<span class="ico-ori"></span>
</li>
<li class="blank">|</li>
<li>
浏览：<span class="views">4863</span>
</li>
<li class="blank">|</li>
<li>更新：<time>2014-02-19 18:19</time>
</li>
</ul></div>
<div class="wgt-thumbs clearfix" alog-group="wgt-thumbs">
<ul>
<li>
<div class="zoom-wrap">
<a href="/album/e4d08ffdd417660fd3f60d70.html?picindex=1">
<img class="lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://a.hiphotos.baidu.com/exp/whcrop=92,69/sign=93d79f003b12b31bc7399b6be9680b43/86d6277f9e2f0708c8622947eb24b899a901f216.jpg" />
</a>
<span class="shdow"></span>
<span class="step">1</span>
</div>
</li>
<li>
<div class="zoom-wrap">
<a href="/album/e4d08ffdd417660fd3f60d70.html?picindex=2">
<img class="lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://a.hiphotos.baidu.com/exp/whcrop=92,69/sign=4a801b82e2fe9925cb593f125bd863e6/d009b3de9c82d158bc165af6820a19d8bd3e42e4.jpg" />
</a>
<span class="shdow"></span>
<span class="step">2</span>
</div>
</li>
<li>
<div class="zoom-wrap">
<a href="/album/e4d08ffdd417660fd3f60d70.html?picindex=3">
<img class="lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://c.hiphotos.baidu.com/exp/whcrop=92,69/sign=2d0992b57f1ed21b799c78a7c21ee0fd/aa18972bd40735fa4c504dfe9c510fb30e2408d0.jpg" />
</a>
<span class="shdow"></span>
<span class="step">3</span>
</div>
</li>
<li>
<div class="zoom-wrap">
<a href="/album/e4d08ffdd417660fd3f60d70.html?picindex=4">
<img class="lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://a.hiphotos.baidu.com/exp/whcrop=92,69/sign=e0b84d9b56e736d15846da4af42072fb/cf1b9d16fdfaaf51ab6882f88e5494eef11f7ae9.jpg" />
</a>
<span class="shdow"></span>
<span class="step">4</span>
</div>
</li>
<li>
<div class="zoom-wrap">
<a href="/album/e4d08ffdd417660fd3f60d70.html?picindex=5">
<img class="lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://c.hiphotos.baidu.com/exp/whcrop=92,69/sign=2ef9ba6703e939015657db7c149c69de/e4dde71190ef76c6f5cff96c9f16fdfaaf516753.jpg" />
</a>
<span class="shdow"></span>
<span class="step">5</span>
</div>
</li>
<li>
<div class="zoom-wrap">
<a href="/album/e4d08ffdd417660fd3f60d70.html?picindex=6">
<img class="lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://g.hiphotos.baidu.com/exp/whcrop=92,69/sign=66903e53a918972ba36f568889bd46b0/ac4bd11373f08202ec29937849fbfbedab641b39.jpg" />
</a>
<span class="shdow"></span>
<span class="step">6</span>
</div>
</li>
<li>
<div class="zoom-wrap">
<a href="/album/e4d08ffdd417660fd3f60d70.html?picindex=7">
<img class="lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://f.hiphotos.baidu.com/exp/whcrop=92,69/sign=683ce66471f082022dc7c77d248bc6d4/b219ebc4b74543a94751f88b1c178a82b901142a.jpg" />
</a>
<span class="shdow"></span>
<span class="step">7</span>
</div>
</li>
</ul>
<a class="step-read" href="/album/e4d08ffdd417660fd3f60d70.html">分步阅读<span></span></a>
</div>
<div alog-group="exp-content" class="exp-content format-exp" id="format-exp">
<div class="exp-content-block">
<div class="exp-content-body exp-brief-step">
<div class="exp-content-listblock">
<div class="content-listblock-text">
<p>&nbsp;&nbsp;对于很多刚刚接触linux的朋友来说，如何设置linux系统的IP地址，作为第一步，下面小编以centos系统为例，给大家演示如何给centos设置IP地址<strong><em>，如何修改linux&nbsp;系统IP地址？</em></strong></p>
</div>
<div class="content-listblock-media">
<div class="content-listblock-image clearfix exp-image-center">
<a class="exp-image-wraper"  href="/album/e4d08ffdd417660fd3f60d70.html?picindex=1" target="_self">
<img class="exp-image-default lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://a.hiphotos.baidu.com/exp/w=500/sign=3149458780025aafd3327ecbcbecab8d/86d6277f9e2f0708c8622947eb24b899a901f216.jpg"/>
<span class="exp-album-enter-mask"></span><span class="enter-step-btn">步骤阅读</span>
</a>
</div>
<div class="exp-brief-clear"></div></div>
</div>
</div>
</div>
<div class="exp-content-block">
<h2 class="exp-content-head">
<a href="javascript:;" name="section-2"></a>
工具/原料
</h2>
<div class="exp-content-body">
<ul class="exp-content-unorderlist ">
<li class="exp-content-list list-item-1">
<div class="content-list-text">
<p>linux系统，centos</p>
</div>
</li>
</ul>
</div>
</div>
<div class="exp-content-block">
<h2 class="exp-content-head">
<a href="javascript:;" name="section-3"></a>
查看IP地址
</h2>
<div class="exp-content-body">
<ol class="exp-conent-orderlist">
<li class="exp-content-list list-item-1">
<div class="list-icon">1</div>
<div class="content-list-text">
<p>登陆连接centos系统，输入&nbsp;ifconfig&nbsp;可以查看到当前本机的IP地址信息，如下图</p>
</div>
<div class="content-list-media">
<div class="content-list-image clearfix">
<a class="exp-image-wraper"  href="/album/e4d08ffdd417660fd3f60d70.html?picindex=2" target="_self">
<img class="exp-image-default lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://a.hiphotos.baidu.com/exp/w=500/sign=51968e7979ec54e741ec1a1e89399bfd/d009b3de9c82d158bc165af6820a19d8bd3e42e4.jpg" />
<span class="exp-album-enter-mask"></span><span class="enter-step-btn">步骤阅读</span>
</a>
</div>
</div>
<div class="last-item"><span class="last-item-end">END</span></div></li>
</ol>
</div>
</div>
<div class="exp-content-block">
<h2 class="exp-content-head">
<a href="javascript:;" name="section-4"></a>
临时设置IP地址
</h2>
<div class="exp-content-body">
<ol class="exp-conent-orderlist">
<li class="exp-content-list list-item-1">
<div class="list-icon">1</div>
<div class="content-list-text">
<p>如本机为例，上面查询IP为1.117，输入&nbsp;ifconfig&nbsp;eth0&nbsp;（默认是第一个网卡）&nbsp;后面接IP地址，&nbsp;网络掩码和&nbsp;网关，如果不设置，就使用默认的掩码</p>
</div>
<div class="content-list-media">
<div class="content-list-image clearfix">
<a class="exp-image-wraper"  href="/album/e4d08ffdd417660fd3f60d70.html?picindex=3" target="_self">
<img class="exp-image-default lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://c.hiphotos.baidu.com/exp/w=500/sign=8f82a3bdd3c8a786be2a4a0e5708c9c7/aa18972bd40735fa4c504dfe9c510fb30e2408d0.jpg" />
<span class="exp-album-enter-mask"></span><span class="enter-step-btn">步骤阅读</span>
</a>
</div>
</div>
</li>
<li class="exp-content-list list-item-2">
<div class="list-icon">2</div>
<div class="content-list-text">
<p>再次查看IP就已经变成新的IP地址了</p><p><em><strong>注意这种方法修改只是临时修改，重启网卡或服务器后又会还原</strong></em></p>
</div>
<div class="content-list-media">
<div class="content-list-image clearfix">
<a class="exp-image-wraper"  href="/album/e4d08ffdd417660fd3f60d70.html?picindex=4" target="_self">
<img class="exp-image-default lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://a.hiphotos.baidu.com/exp/w=500/sign=cba58609c88065387beaa413a7dca115/cf1b9d16fdfaaf51ab6882f88e5494eef11f7ae9.jpg" />
<span class="exp-album-enter-mask"></span><span class="enter-step-btn">步骤阅读</span>
</a>
</div>
</div>
<div class="last-item"><span class="last-item-end">END</span></div></li>
</ol>
</div>
</div>
<div class="exp-content-block">
<h2 class="exp-content-head">
<a href="javascript:;" name="section-5"></a>
设置\修改IP地址
</h2>
<div class="exp-content-body">
<ol class="exp-conent-orderlist">
<li class="exp-content-list list-item-1">
<div class="list-icon">1</div>
<div class="content-list-text">
<p>如果要让IP地址永久生效，需要编辑网卡配置文件</p><p>使用VI编辑器设置，如&nbsp;<strong><em>vi&nbsp;/etc/sysconfig/network-scripts/ifcfg-eth0&nbsp;</em></strong></p>
</div>
<div class="content-list-media">
<div class="content-list-image clearfix">
<a class="exp-image-wraper"  href="/album/e4d08ffdd417660fd3f60d70.html?picindex=5" target="_self">
<img class="exp-image-default lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://c.hiphotos.baidu.com/exp/w=500/sign=947c274f5143fbf2c52ca623807fca1e/e4dde71190ef76c6f5cff96c9f16fdfaaf516753.jpg" />
<span class="exp-album-enter-mask"></span><span class="enter-step-btn">步骤阅读</span>
</a>
</div>
</div>
</li>
<li class="exp-content-list list-item-2">
<div class="list-icon">2</div>
<div class="content-list-text">
<p><strong>说明一下这个文件；</strong>DEVICE=eth0&nbsp;&nbsp;网卡对应的设备别名，如ifcfg-eth0第一块网卡&nbsp;BOOTPROTO=static&nbsp;</p><p>网卡获得ip地址的方式，</p><p>Static（静态&nbsp;ip地址）</p><p>dhcp（通过dhcp协议获取ip）</p><p>bootip通过bootp协议获得的ip地址&nbsp;BROADCAST=192.168.0.255&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;子网广播地址&nbsp;<strong><em>HWADDR</em></strong>=00:50:56:8E:47:EE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;网卡物理地址&nbsp;<em><strong>IPADDR</strong></em>=12.168.1.117&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;网卡IP地址</p><p><em><strong>IPV6INIT</strong></em>=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;是否启用IPV6<em><strong>IPV6_AUTOCONF</strong></em>=no&nbsp;NETMASK=255.255.255.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;网卡对应网络掩码&nbsp;NETWORK=192.168.1.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;网卡对应的网络地址&nbsp;ONBOOT=yes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;系统启动时是否设置此网络接口，设置为yes时，系统启动时激活此设备。默认设置为yes</p><p>至于后面的&nbsp;TYPE&nbsp;和UUID这个就不用管了，这网卡的类型</p>
</div>
</li>
<li class="exp-content-list list-item-3">
<div class="list-icon">3</div>
<div class="content-list-text">
<p>2.使用vi编辑器，&nbsp;按&nbsp;<strong>insert键插入</strong>，进入编辑模式</p>
</div>
<div class="content-list-media">
<div class="content-list-image clearfix">
<a class="exp-image-wraper"  href="/album/e4d08ffdd417660fd3f60d70.html?picindex=6" target="_self">
<img class="exp-image-default lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://g.hiphotos.baidu.com/exp/w=500/sign=0c27fa66708b4710ce2ffdccf3cfc3b2/ac4bd11373f08202ec29937849fbfbedab641b39.jpg" />
<span class="exp-album-enter-mask"></span><span class="enter-step-btn">步骤阅读</span>
</a>
</div>
</div>
</li>
<li class="exp-content-list list-item-4">
<div class="list-icon">4</div>
<div class="content-list-text">
<p>3.将光标移动到&nbsp;IPADDR&nbsp;设置部分，改成需要设置的IP地址，</p><p>如本例中改成&nbsp;1.118.&nbsp;按下esc&nbsp;键。&nbsp;</p><p>输入<em><strong>&nbsp;冒号：wq&nbsp;</strong></em>保存退出</p><p>会提示&nbsp;&quot;/etc/sysconfig/network-scripts/ifcfg-eth0&quot;&nbsp;14L,&nbsp;302C&nbsp;written</p>
</div>
<div class="content-list-media">
<div class="content-list-image clearfix">
<a class="exp-image-wraper"  href="/album/e4d08ffdd417660fd3f60d70.html?picindex=7" target="_self">
<img class="exp-image-default lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://f.hiphotos.baidu.com/exp/w=500/sign=176c398319d5ad6eaaf964eab1ca39a3/b219ebc4b74543a94751f88b1c178a82b901142a.jpg" />
<span class="exp-album-enter-mask"></span><span class="enter-step-btn">步骤阅读</span>
</a>
</div>
</div>
</li>
<li class="exp-content-list list-item-5">
<div class="list-icon">5</div>
<div class="content-list-text">
<p>4.&nbsp;设置好之后，把网络服务重启一下，如下图2个命令均可以&nbsp;&nbsp;<em>service&nbsp;network&nbsp;restart</em></p>
</div>
<div class="content-list-media">
<div class="content-list-image clearfix">
<a class="exp-image-wraper"  href="/album/e4d08ffdd417660fd3f60d70.html?picindex=8" target="_self">
<img class="exp-image-default lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://h.hiphotos.baidu.com/exp/w=500/sign=309b0739271f95caa6f592b6f9167fc5/d1160924ab18972b7396028de4cd7b899f510acc.jpg" />
<span class="exp-album-enter-mask"></span><span class="enter-step-btn">步骤阅读</span>
</a>
</div>
</div>
</li>
<li class="exp-content-list list-item-6">
<div class="list-icon">6</div>
<div class="content-list-text">
<p>5.再次查看IP你会发现已经改成新的IP地址&nbsp;&nbsp;1.118了</p>
</div>
<div class="last-item"><span class="last-item-end">END</span></div></li>
</ol>
</div>
</div>
<div class="exp-content-block">
<h2 class="exp-content-head">
<a href="javascript:;" name="section-6"></a>
图形界面操作
</h2>
<div class="exp-content-body">
<ol class="exp-conent-orderlist">
<li class="exp-content-list list-item-1">
<div class="list-icon">1</div>
<div class="content-list-text">
<p>除此之外，</p><p>您可以可以在图形界面操作。编辑网卡设置，&nbsp;或者使用&nbsp;netconfig命令进入图形界面设置</p>
</div>
<div class="content-list-media">
<div class="content-list-image clearfix">
<a class="exp-image-wraper"  href="/album/e4d08ffdd417660fd3f60d70.html?picindex=9" target="_self">
<img class="exp-image-default lazy-load-img" alt="Centos如何设置IP地址,LINUX怎么修改IP地址" data-src="http://b.hiphotos.baidu.com/exp/w=500/sign=7fea2ae2087b02080cc93fe152d8f25f/f7246b600c338744fa142d3b530fd9f9d62aa0a7.jpg" />
<span class="exp-album-enter-mask"></span><span class="enter-step-btn">步骤阅读</span>
</a>
</div>
</div>
</li>
<li class="exp-content-list list-item-2">
<div class="list-icon">2</div>
<div class="content-list-text">
<p>设置之后，如果需要IP生效。同样需要重启网络服务，或者重启电脑</p>
</div>
<div class="last-item"><span class="last-item-end">END</span></div></li>
</ol>
</div>
</div>
<div class="exp-content-block">
<h2 class="exp-content-head">
<a href="javascript:;" name="section-7"></a>
注意事项
</h2>
<div class="exp-content-body">
<ul class="exp-content-unorderlist ">
<li class="exp-content-list list-item-1">
<div class="content-list-text">
<p>ifconfig修改密码是临时的，重启网卡服务或服务器后又会还原。以上方法对linux其他发行版有效</p>
</div>
</li>
</ul>
</div>
</div>
<div id="auto-app-placehold"></div>
<script>window.PDC && PDC.first_screen && PDC.first_screen();</script>
<div class="prompt">
<span class="prompt-ico"></span>
经验内容仅供参考，如果您需解决具体问题(尤其法律、医学等领域)，建议您详细咨询相关领域专业人士。</div>
<div class="f12 origin-notice" data-test="1">
<span class="i-original"></span><span><em>作者声明：</em>本篇经验系本人依照真实经历原创，未经许可，谢绝转载。</span>
</div>
</div>
</article>
<div class="button-list">
<span class="useful-button-wp">
<a class="is-good-button" id="useful-exp"><span class="a-l">投票</span><span class="a-h">+1</span><span class="a-c">已投票</span></a>
<span id="a-a" class="a-a" style="display:none;">+1</span>
</span>
<span class="collect-button-wp"><a class="collect-button" id="favor-exp"><span class="a-l">收藏</span><span class="a-h">+1</span><span class="a-c">已收藏</span></a></span>
<span class="comment-button-wp"><a class="open-comment-button comment-on-close" id="toggle-comment"><span class="on-close">评论<span>(1)</span></span><span class="on-open">收起评论</span></a></span>
</div>
<div class="exp-comment" id="exp-comment" style="display:none">
<div class="comment-editor" feedStatus="0">
<input class="comment-editor-input no-input" id="comment-editor-e"  feedStatus="0" value="来说点啥..." />
<a class="right comment-submit-btn no-input" id="comment-submit-e" href="javascript:void(0)">发布</a>
</div>
<div id="word-num-pmt-e" class="comment-tip"></div>
<div id="comment-list-e" class="comment-list">正在加载最新评论...</div>
</div>
<div class="main-content-bottom">
<div id="relate-explist" class="exp-item-list">
<h3>相关经验</h3>
<ul alog-group="relate-explist">
<li class="related-exp-link"><a href="/article/455a99508be7cda167277865.html" target="_blank" log="type:1000, pos:relate_title,si:1">如何在linux系统中设置静态ip地址</a><em class="has-img"></em><span class="exp-suc-num"><span class="suc-ico"></span>18</span><span class="exp-date">2014.02.21</span></li>
<li class="related-exp-link"><a href="/article/359911f574f61b57fe030604.html" target="_blank" log="type:1000, pos:relate_title,si:2">centos 6.5 linux设置dns</a><em class="has-img"></em><span class="exp-suc-num"><span class="suc-ico"></span>6</span><span class="exp-date">2013.12.29</span></li>
<li class="related-exp-link"><a href="/article/2c8c281dfa43da0008252acb.html" target="_blank" log="type:1000, pos:relate_title,si:3">linux操作系统下载之centos 6.5 下载</a><span class="exp-suc-num"><span class="suc-ico"></span>14</span><span class="exp-date">2013.12.16</span></li>
<li class="related-exp-link"><a href="/article/f7ff0bfc6bc0472e26bb13bf.html" target="_blank" log="type:1000, pos:relate_title,si:4">centos linux 编译安装pcre软件</a><em class="has-img"></em><span class="exp-suc-num"><span class="suc-ico"></span>5</span><span class="exp-date">2014.01.13</span></li>
<li class="related-exp-link"><a href="/article/da1091fbd6c5e2027849d626.html" target="_blank" log="type:1000, pos:relate_title,si:5">解决克隆centos ip配置失败：[2]Centos</a><span class="exp-suc-num"><span class="suc-ico"></span>0</span><span class="exp-date">2014.07.15</span></li>
</ul>
</div>
<div class="tag-explist">
<strong>相关标签</strong>
<a href="/tag/12" target="_blank">windows7</a>
<a href="/tag/2070" target="_blank">android</a>
<a href="/tag/3543" target="_blank">excel</a>
</div>
<script src="http://s1.bdstatic.com/r/www/cache/ecom/esl/1-4-2/esl.js" type="text/javascript"></script>
<script type="text/javascript">
        require.config({paths: { ecom: 'http://s1.bdstatic.com/r/www/cache/biz/ecom'}});
    </script>
<script type="text/javascript" src="http://a.baidu.com/ecom?di=574,575&tm=baiduASPT574S,baiduASPT575S&word=centosiplinuxip&tn=baidujingyan_pg,baidujingyan_pg&asp_refer=http%3A%2F%2Fwww.baidu.com%2Fs%3Fwd%3Dcentos%25E8%25AE%25BE%25E7%25BD%25AEip%26ie%3Dutf-8%26tn%3Dbaiduhome_pg%26oq%3Dcentos%25E8%25AE%25BE%25E7%25BD%25AE%26f%3D3%26usm%3D1%26rsv_bp%3D1%26rsv_spt%3D3%26inputT%3D5443%26rsv_sug3%3D117%26rsv_sug4%3D12336%26rsv_sug1%3D72%26rsv_sug2%3D0%26rsp%3D1%26bs%3Dvmware%2520%25E6%25A1%25A5%25E6%258E%25A5%2520ping%25E4%25B8%258D%25E9%2580%259A" charset="gbk"></script>
<div class="bottom-ads-container" id="bottom-ads-container">
<div class="bottom-text-ads" id="bottom-text-ads-wrap">
<script type="text/javascript">BaiduAdsDisplay(575);</script>
</div>
<div class="bottom-pic-ads" id="bottom-pic-ads">
</div>
</div>
</div>
</div>
<aside class="main-aside" id="aside">
<div id="wgt-feedback" class="wgt-feedback clearfix">
<div id="usefull-btn-area" class="btn-area usefull-btn">
<span class="icon usefull-ico"></span>
<span id="usefull-num" class="text usefull-num">1</span>
<span class="text default-tip">投票</span>
<span class="text used-tip">已投票</span>
<span id="a-s" class="a-s" style="display:none;">+1</span>
</div>
<div id="favor-btn-area" class="btn-area favor-btn">
<div id="favor-btn-wrap" class="btn-wrap">
<span class="icon"></span>
<span class="text normal-txt">收藏</span>
<span class="text default-tip">收藏+1</span>
<span class="text used-tip">已收藏</span>
</div>
</div>
<div id="jmag-btn-area" class="btn-area join-mag-btn">
<span class="icon join-mag-ico"></span>
<span class="text share-num">加入杂志</span>
</div>
<div id="vote-box-e" class="vote-box" style="display:none">
<div class="vote-arrow"><em>◆</em><span>◆</span></div>
<a href="#" class="v-close" title="关闭">×</a>
<div class="vote-outter">
<p class="v-tit">说说你为什么给这篇经验投票吧！</p>
<p class="v-ipt">
<input id="v-ipt-txt" type="text" class="v-ipt-txt" />
<input id="v-sub-btn" type="submit" class="v-sub-btn" value="提交" />
</p>
<ul class="v-extra">
<li><a class="intr-txt" href="#">写的太赞</a></li>
<li><a class="intr-txt" href="#">非常实用</a></li>
<li><a class="intr-txt" href="#">帮到了我</a></li>
<li class="last"><a class="intr-txt" href="#">作者很棒</a></li>
</ul>
</div>
</div>
<div id="vote-box-t" class="vote-box vote-box-tip" style="display:none">
<div class="vote-arrow"><em>◆</em><span>◆</span></div>
<a href="#" class="v-close" title="关闭">×</a>
<div id="vote-outter-t" class="vote-outter">
<p class="v-tit">您已对该篇经验进行了投票，再次投票需要消耗20财富值？</p><input type="submit" class="c-sub-btn" value="确定" />
</div>
</div>
</div>
<script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=5827690" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
	function getImgsByClassName (className) {
		var all = document.getElementsByTagName('img');
		var elements = new Array();
		for (var e = 0; e < all.length; e++) {
			if (all[e].className.indexOf(className) > -1) {
				elements[elements.length] = all[e];
				break;
			}
		}
		return elements;
	}
	var sharePicture,bds_config;
		
	var context = '';
				

	var imgs = getImgsByClassName("exp-image-default");
	if(imgs != null && imgs.length > 0){
		sharePicture = imgs[0].getAttribute('data-src') || imgs[0].src;
	}

	sharePicture = sharePicture || 'http://img.baidu.com/img/iknow/exp/logo_beta_normal.jpg';

	var shareText = document.title.replace(/_百度经验$/,'')+'_分享自@百度经验';
			
	bds_config = {
		bdMiniWindow : 1,
		'snsKey':{
			'tsina':'1214333208'
		},
		'bdText':shareText,
		'bdPic':sharePicture,
		'searchPic' : 0,
		'weiboText':context,         //微博的分享文案,
		onBeforeClick: function(){
			alert('test');
		}
	};

document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)
</script>
<div class="aside-wrap">
<div id="wgt-author" class="wgt-author">
<div class="author-wrap">
<div class="author-normal">
<div class="base-info clearfix">
<div class="author-portrait left">
<a href="/user/npublic?un=%E5%92%97%E5%9A%9B" target="_blank" rel="nofollow">
<div class="portrait-cover"></div>
<img src="http://himg.bdimg.com/sys/portrait/item/5167e59297e59a9b2e07.jpg"/>
</a></div>
<div class="author-info left">
<h2><a href="/user/npublic?un=%E5%92%97%E5%9A%9B" title="咗嚛" target="_blank" rel="nofollow">咗嚛</a>
</h2>
<div class="icon-wrp">
<div class="icon-huiz">
<a class="u-icon cpm5" title="特约作者" href="/help?page=income-author" target="_blank" rel="nofollow"></a>
<a class="u-icon privilege1" title="优先审核用户" href="/help?page=privilege-author" target="_blank" rel="nofollow"></a>
</div>
</div>
<a id="follow-user-e" class="u-follow-btn follow-btn" href="javascript:;"></a>
</div>
</div>
<div id="userResume"  class="user-resume"><span class="u-tit">简介：</span>擅长网络,电脑等领域,希望能帮到大家,关于经验疑问欢迎提问交流</div>
</div>
</div>
<div class="usr-explist">
<h3>作者的经验</h3>
<ul alog-group="usr-explist">
<li>
<a href="/article/0eb457e508f5d303f1a905b3.html" target="_blank" title="http错误401.1未经过授权 您未被授权查看该页" log="type:1000,pos:author_title">http错误401.1未经过授权 您未被授权...</a>
</li>
<li>
<a href="/article/f71d60377930651ab641d1b0.html" target="_blank" title="QQ群不能显示群内成员名字 群列表群名称不显示" log="type:1000,pos:author_title">QQ群不能显示群内成员名字 群列表群...</a>
</li>
<li>
<a href="/article/ca00d56c710ef9e99eebcf85.html" target="_blank" title="Tp-link路由器怎么设置端口映射 内网端口映射" log="type:1000,pos:author_title">Tp-link路由器怎么设置端口映射 内网...</a>
</li>
<li>
<a href="/article/91f5db1bd419e71c7f05e396.html" target="_blank" title="Centos怎么更新系统？ Linux系统怎么更新补丁？" log="type:1000,pos:author_title">Centos怎么更新系统？ Linux系统怎么...</a>
</li>
<li>
<a href="/article/414eccf612e0c16b431f0a95.html" target="_blank" title="如何登录mysql？ cmd怎么连接mysql数据库" log="type:1000,pos:author_title">如何登录mysql？ cmd怎么连接mysql数...</a>
</li>
</ul>
</div>
</div>
<div class="wgt-author">
<div class="usr-explist recommend-topic">
<h3>内容推荐</h3>
<ul>
<div class="rtopic"><h4><a href="http://jingyan.baidu.com/article/37bce2be24ddfe1002f3a237.html" target="_blank" style="color:#fff">十招教你管孩子</a></h4>
<a href="http://jingyan.baidu.com/article/37bce2be24ddfe1002f3a237.html" target="_blank"><img data-src="http://jingyan.baidu.com/event/img/140725-5.jpg" alt="十招教你管孩子" style="width:250px;" class="lazy-load-img" /></a><br />
</div>
<li><a href="http://jingyan.baidu.com/article/b87fe19eba68fb52183568f0.html"  target="_blank">飞机失事自救指南</a><span>36</span><span class="usefulicon"></span></li><li><a href="http://jingyan.baidu.com/article/ae97a6468a768ebbfd461dc2.html"  target="_blank">怎样挑选葡萄</a><span>29</span><span class="usefulicon"></span></li><li><a href="http://jingyan.baidu.com/article/19020a0ac42d21529d28420d.html"  target="_blank">爽口小菜：炝拌豇豆</a><span>40</span><span class="usefulicon"></span></li><li><a href="http://jingyan.baidu.com/article/6fb756eccfcd44241858fb14.html"  target="_blank">洗衣干净又省水的小窍门</a><span>62</span><span class="usefulicon"></span></li><li><a href="http://jingyan.baidu.com/article/fd8044faffd1a45030137a5b.html"  target="_blank">如何有效缓解眼疲劳</a><span>38</span><span class="usefulicon"></span></li></ul>
</div>
</div>
<div class="aside-pro-container">
<div class="wgt-cms-banner">
<div class="cms-slide-wrap" id="cms-slide-wrap">
<div class="cms-slide-img" id="cms-slide-img">
<a target="_blank" log="type:cmsbanner,location:qb,menu:1" href="http://jingyan.baidu.com/z/deodorant/index.html"  rel="nofollow">
<img data-src="http://jingyan.baidu.com/z/deodorant/images/250X85.jpg" alt="夏季清新干爽的秘密：止汗剂" class="lazy-load-img"  />
</a>
<a target="_blank" log="type:cmsbanner,location:qb,menu:2" href="http://jingyan.baidu.com/activity/voteacts"  rel="nofollow" style="display:none;">
<img data-src="http://jingyan.baidu.com/event/img/tp-250X85.jpg" alt="争霸赛" class="lazy-load-img"  />
</a>
<a target="_blank" log="type:cmsbanner,location:qb,menu:3" href="http://jingyan.baidu.com/z/hancan/index.html"  rel="nofollow" style="display:none;">
<img data-src="http://jingyan.baidu.com/z/hancan/img/250X80.jpg" alt="韩餐专题" class="lazy-load-img"  />
</a>
</div>
<div class="cms-slide-btn" id="cms-slide-btn">
<a href="javascript:;" hidefocus="true" class="sli-btn on" rel="nofollow">&bull;</a>
<a href="javascript:;" hidefocus="true" class="sli-btn" rel="nofollow">&bull;</a>
<a href="javascript:;" hidefocus="true" class="sli-btn" rel="nofollow">&bull;</a>
</div>
</div>
</div>
<div class="aside-ads-container" id="aside-ads-container">
<div class="aside-text-ads" id="aside-text-ads-wrap">
<script type="text/javascript">BaiduAdsDisplay(574);</script>
</div>
<div class="aside-pic-ads" id="aside-pic-ads">
</div>
</div>
</div>
<span class="tousu">
如要投诉，请到<a href="http://tousu.baidu.com/jingyan/add#2" class="tousu-address" target="_blank" rel="nofollow">百度经验投诉中心</a>，如要提出意见、建议，        请到<a href="http://tieba.baidu.com/f?kw=%B0%D9%B6%C8%BE%AD%D1%E9%B9%DC%C0%ED" target="_blank" rel="nofollow">百度经验管理吧</a>反馈。</span>
</div>
</aside>
</div>
<div class="line mt40"></div>
<div class="magzine-list">
<h2 class="page-column">热门杂志</h2>
<div class="page-column">
<ul class="clearfix" alog-group="magzine-list">
<li class="first-li"><div class="m-cv"><img class="lazy-load-img" data-src="http://a.hiphotos.baidu.com/exp/whcrop=160,120/sign=fcc1aee4e4cd7b89e9396cc160547f96/f9dcd100baa1cd115a4ddc0ebb12c8fcc3ce2d20.jpg" /><span class="m-bg"></span><span>第1期</span></div><strong>你不知道的iPad技巧</strong><div class="m-sn"><span></span>525次分享</div><a target="_blank" log="type:5003" href="/magazine/6872"></a></li>
<li><div class="m-cv"><img class="lazy-load-img" data-src="http://h.hiphotos.baidu.com/exp/whcrop=160,120/sign=88fb042399504fc2a20ae6478aadda20/faf2b2119313b07e6d55d8230ed7912397dd8c35.jpg" /><span class="m-bg"></span><span>第1期</span></div><strong>win7电脑那些事</strong><div class="m-sn"><span></span>1052次分享</div><a target="_blank" log="type:5003" href="/magazine/6454"></a></li>
<li><div class="m-cv"><img class="lazy-load-img" data-src="http://e.hiphotos.baidu.com/exp/whcrop=160,120/sign=274a35929045d688a357e4e6cbb2402f/18d8bc3eb13533fa663c6f8faad3fd1f40345b8d.jpg" /><span class="m-bg"></span><span>第2期</span></div><strong>新人玩转百度经验</strong><div class="m-sn"><span></span>160次分享</div><a target="_blank" log="type:5003" href="/magazine/17909"></a></li>
<li><div class="m-cv"><img class="lazy-load-img" data-src="http://e.hiphotos.baidu.com/exp/whcrop=160,120/sign=5d1c2ce157fbb2fb347e0e50203a1d95/a08b87d6277f9e2f03fa39b41d30e924b999f3ba.jpg" /><span class="m-bg"></span><span>第1期</span></div><strong>Win8.1实用小技巧</strong><div class="m-sn"><span></span>584次分享</div><a target="_blank" log="type:5003" href="/magazine/17761"></a></li>
<li><div class="m-cv"><img class="lazy-load-img" data-src="http://c.hiphotos.baidu.com/exp/whcrop=160,120/sign=c8aa99ae13dfa9ecfd7b00550da0ca32/a8773912b31bb051c260489a347adab44aede038.jpg" /><span class="m-bg"></span><span>第1期</span></div><strong>小白装大神</strong><div class="m-sn"><span></span>293次分享</div><a target="_blank" log="type:5003" href="/magazine/17450"></a></li>
</ul>
</div>
</div>

</section><footer class="footer">

&copy;2014Baidu&nbsp;&nbsp;<a href="http://www.baidu.com/duty/" target="_blank" rel="nofollow">使用百度前必读</a>&nbsp;&nbsp;<a href="http://www.baidu.com/search/jingyan_help.html#经验协议" target="_blank" rel="nofollow">百度经验协议</a>&nbsp;&nbsp;<a href="http://www.baidu.com/search/jingyan_editor.html" target="_blank" rel="nofollow">作者创作作品协议</a>
<script type="text/javascript">
    var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
    document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F46c8852ae89f7d9526f0082fafa15edd' type='text/javascript'%3E%3C/script%3E"));

	if(window.console){
		var cons = console;
		if(cons){
			cons.log("这位看代码的童鞋，不如来和我们一起为百度经验添砖加瓦吧！");
			cons.log("有意求职者，请邮件至：%cjobs_zhidao@baidu.com %c(邮件请注明来自:console)","color:red;font-weight:bold;","color:#666");
		}
	}
</script>

</footer>



<script type="text/javascript">
	if(typeof PDC != 'undefined'){
		PDC.init({
			is_login   : 1,
			sample     : 0.2,
			product_id : 132,
			page_id    : 4
		});
	}
	F.context({
		//请求地址
		"common":'/common',
		"uoper": '/uoperation',
		"edit": '/edit/',
		"isVersionExist" : '/common/isVersionExist',
		//用户有关
		"isLogin" : 1,
		"isAdmin": 0,
		"isOriginal":1,
		"username": '狂热CC',
		"writerId": '咗嚛',
		"followedNum": 0,
		"votedNum": 0,
		"totalVotedNum": 0,
		"maxFollowVote": 9999999,
		"ucFollowing": '/user/nuc/following',
		"ucFavorexp": '/user/nuc/favorexp',
		"eid": 'e4d08ffdd417660fd3f60d70',
		"comment": '/comment/',
		"hi": 'http://hiphotos.baidu.com/exp/abpic/item/',
		"COMMENT_MAX_LEN" : "600",
		"REPLY_MAX_LEN": 200,
		"isFavor":0,
		"expFavorNum": 34,
		"ucFavorexp": '/user/nuc/favorexp',
		"title": 'Centos如何设置IP地址,LINUX怎么修改IP地址',
		"logo": 'http://img.baidu.com/img/iknow/exp/logo_uui.jpg',
		"feedbackSuc": 25,
		"feedbackFail": 0,
		"MAX_SUC_FAIL_TIMES": 999999,
		"relateExpCount": 5,
		"relateTagPicCount": 0,
		"introduction":'不念过去,不惧将来,快乐面对！',
		"resume": "擅长网络,电脑等领域,希望能帮到大家,关于经验疑问欢迎提问交流",
		//说明书
		"isManual": "",
		"hasDownUrl": "",
		"downUrl": "",
		"nextSeries": "",
		"BdStoken" : "b6fe5829b35ec306247446ac8f1e945b",
		"bdstt" : "1406348771"	});
</script>
<div id="wgt-exp-share" class="wgt-exp-share">
<div class="wrp-exp-share">
<a id="w-share" class="w-share" href="javascript:void(0)"><span class="w-txt">分享</span></a>
<a id="w-reply" class="w-reply" href="#exp-comment"><span class="w-txt">评论<br />(1)</span></a>
<a id="w-gotop" class="w-gotop" href="javascript:void(0)"><span class="w-txt">返回<br />顶部</span></a>
</div>
<div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare exp-share-wgt" style="display:none;">
<a class="bds_tsina" log="type:3002,menu:1"><span class="w-txt">新浪<br />微博</span></a>
<a class="bds_qzone" log="type:3002,menu:2"><span class="w-txt">QQ<br />空间</span></a>
<a id="bds-weixin-btn" class="bds-weixin" log="type:3002,menu:6"></a>
<a class="bds_tqq" log="type:3002,menu:3"><span class="w-txt">腾讯<br />微博</span></a>
<a class="bds_renren" log="type:3002,menu:4"><span class="w-txt">人人</span></a>
<a class="bds_mshare" log="type:3002,menu:5"><span class="w-txt">一键<br />分享</span></a>
</div>
<div id="weixin-wrap-wgt" class="wx-wrp-wgt">
<div class="wx-arrow">
<span>◆</span>
</div>
<div id="qrcode-wrp" class="qrcode-wrp"></div>
<span>请扫描分享到朋友圈</span>
</div>
</div>
<script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=5827690" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
	function getImgsByClassName (className) {
		var all = document.getElementsByTagName('img');
		var elements = new Array();
		for (var e = 0; e < all.length; e++) {
			if (all[e].className.indexOf(className) > -1) {
				elements[elements.length] = all[e];
				break;
			}
		}
		return elements;
	}
	var sharePicture,bds_config;
		
	var context = '';
				

	var imgs = getImgsByClassName("exp-image-default");
	if(imgs != null && imgs.length > 0){
		sharePicture = imgs[0].getAttribute('data-src') || imgs[0].src;
	}

	sharePicture = sharePicture || 'http://img.baidu.com/img/iknow/exp/logo_beta_normal.jpg';

	var shareText = document.title.replace(/_百度经验$/,'')+'_分享自@百度经验';
			
	bds_config = {
		bdMiniWindow : 1,
		'snsKey':{
			'tsina':'1214333208'
		},
		'bdText':shareText,
		'bdPic':sharePicture,
		'searchPic' : 0,
		'weiboText':context         //微博的分享文案,
	};

document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)
</script>
<div class="blue-book-ads hide" id="blue-book-ads" log="type:140718"></div>
<script type="text/javascript">var pageId = "jingyan-article2";</script>
<script type="text/javascript" src="http://img.baidu.com/hunter/monkey.jingyan.min.js"></script>


<script>(function(){PDC.extend({_navTiming:window.performance&&performance.timing,ready:(function(callback){var readyBound=false,readyList=[],DOMContentLoaded,isReady=false;
            if(document.addEventListener){DOMContentLoaded=function(){document.removeEventListener("DOMContentLoaded",DOMContentLoaded,false);ready()}}else{if(document.attachEvent){DOMContentLoaded=function(){
                if(document.readyState==="complete"){document.detachEvent("onreadystatechange",DOMContentLoaded);ready()}}}}function ready(){if(!isReady){isReady=true;for(var i=0,j=readyList.length;i<j;i++){
                readyList[i]()}}}function doScrollCheck(){try{document.documentElement.doScroll("left")}catch(e){setTimeout(doScrollCheck,1);return}ready()}function bindReady(){if(readyBound){return}readyBound=true;
                if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false);window.addEventListener("load",ready,false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",DOMContentLoaded);
                    window.attachEvent("onload",ready);var toplevel=false;try{toplevel=window.frameElement==null}catch(e){}if(document.documentElement.doScroll&&toplevel){doScrollCheck()}}}}bindReady();return function(callback){
                isReady?callback():readyList.push(callback)}})(),Cookie:{set:function(name,value,max_age){max_age=max_age||10;var exp=new Date();exp.setTime(new Date().getTime()+max_age*1000);document.cookie=name+"="+escape(value)+";path=/;expires="+exp.toGMTString()},get:function(name){
            var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));if(arr!=null){return unescape(arr[2])}return null},remove:function(name){this.set(name,"",-1)}},_is_sample:function(ratio){if(!PDC._random){PDC._random=Math.random()}return PDC._random<=ratio},_load_analyzer:function(){var special_pages=this._opt.special_pages||[];
            var radios=[this._opt.sample];for(var i=0;i<special_pages.length;i++){radios.push(special_pages[i]["sample"])}var radio=Math.max.apply(null,radios);if(PDC._is_sample(radio)==false){return}PDC._analyzer.loaded=true;PDC._load_js(PDC._analyzer.url,function(){var callbacks=PDC._analyzer.callbacks;for(var i=0,l=callbacks.length;i<l;i++){callbacks[i]()}})},_load_js:function(url,callback){
            var script=document.createElement("script");script.setAttribute("type","text/javascript");script.setAttribute("src",url);script.onload=script.onreadystatechange=function(){if(!this.readyState||this.readyState=="loaded"||this.readyState=="complete"){script.onload=script.onreadystatechange=null;if(typeof callback==="function"){callback(url,true)}}};script.onerror=function(e){if(typeof callback==="function"){callback(url,false)}};
            document.getElementsByTagName("head")[0].appendChild(script)},send:function(){if(PDC._analyzer.loaded==true){WPO_PDA.send()}else{PDC._load_analyzer();PDC._analyzer.callbacks.push(function(){WPO_PDA.send()})}}},PDC);!function(){var Cookie=PDC.Cookie,jt=Cookie.get("PMS_JT"),isset=false;if(jt){Cookie.remove("PMS_JT");jt=eval(jt);if(!jt.r||document.referrer.replace(/#.*/,"")==jt.r){(PDC._render_start-jt.s)>100&&PDC.mark("wt",(PDC._render_start-jt.s))}}
            function findParent(tagname,el){var flag=0;if((el.nodeName||el.tagName).toLowerCase()===tagname.toLowerCase()){return el}while(el=el.parentNode){flag++;if((el.nodeName||el.tagName).toLowerCase()===tagname.toLowerCase()){return el}if(flag>=4){return null}}return null}function clickHandle(e){var e=e||window.event;var target=e.target||e.srcElement;var from=findParent("a",target);if(from){var url=from.getAttribute("href");if(!/^#|javascript:/.test(url)){Cookie.set("PMS_JT",'({"s":'+(+new Date)+',"r":"'+document.URL.replace(/#.*/,"")+'"})');isset=true}}}
            if(document.attachEvent){document.attachEvent("onclick",clickHandle)}else{document.addEventListener("click",clickHandle,false)}}();PDC.ready(function(){PDC.mark("drt")});if(document.attachEvent){window.attachEvent("onload",function(){PDC.mark("lt")},false)}else{window.addEventListener("load",function(){PDC.mark("let");PDC._setFS&&PDC._setFS();PDC._opt.ready!==false&&PDC._load_analyzer()})}})();</script>

</div>

</body><script type="text/javascript" src="http://exp.bdstatic.com/static/common/lib/mod_034990c.js"></script>
<script type="text/javascript">require.resourceMap({"res":{"common:widget/lib/tangram/ui/Decorator/Decorator.js":{"url":"http://exp.bdstatic.com/static/common/widget/lib/tangram/ui/Decorator/Decorator_34242b8.js","pkg":"common:p1","deps":["common:widget/lib/tangram/base/base.js","common:widget/lib/tangram/uiBase/uiBase.js"]},"common:widget/lib/tangram/base/base.js":{"url":"http://exp.bdstatic.com/static/common/widget/lib/tangram/base/base_e37cc01.js","pkg":"common:p0"},"common:widget/userbar/userbar.js":{"url":"http://exp.bdstatic.com/static/common/widget/userbar/userbar_79b53ea.js","pkg":"common:p2","deps":["common:widget/lib/tangram/base/base.js","common:widget/lib/fis/event/event.js","common:widget/ui/msg/msg.js"]},"article:widget/exp-title/exp-title.js":{"url":"http://exp.bdstatic.com/static/article/widget/exp-title/exp-title_180fa1f.js","pkg":"article:p0","deps":["common:widget/lib/tangram/base/base.js","common:widget/ui/ajax/ajax.js"]}}});</script><script type="text/javascript" src="http://exp.bdstatic.com/static/common/pkg/common_widget_5977030.js"></script>
<script type="text/javascript" src="http://exp.bdstatic.com/static/common/pkg/common_framework_440df45.js"></script>
<script type="text/javascript" src="http://exp.bdstatic.com/static/common/pkg/home_framework_499c91a.js"></script>
<script type="text/javascript" src="http://exp.bdstatic.com/static/article/pkg/article_d10586e.js"></script>
<script type="text/javascript" src="http://exp.bdstatic.com/static/common/widget/blue-book-ad/blue-book-ad_d4417d4.js"></script>
<script type="text/javascript">!function(){            require.async(['common:widget/lib/tangram/base/base.js', 'common:widget/userbar/userbar.js'], function(T,userbar){
            T.dom.ready(function(){
                //获取登录状态条消息
                userbar.statusMsg("狂热CC");
                //设置"退出"链接的url
                if (T.g("usrbar-logout")) {
                    if(location.href.indexOf("/user/nuc") >-1||location.href.indexOf("/user/npublic") >-1){
                        T.g("usrbar-logout").href = "http://passport.baidu.com/?logout&aid=7&u=http://jingyan.baidu.com";
                    }else{
                        T.g("usrbar-logout").href = "http://passport.baidu.com/?logout&aid=7&u="+escape(location.href);
                    }
                }
            })
        });
    }();
!function(){	require.async(["common:widget/ui/sug/sug.js", "common:widget/lib/tangram/base/base.js", "common:widget/ui/cookie/cookie.js"],function(sug,T,cookie){
		T.dom.ready(function(){
			if(cookie.get("EXP_HIDESUG")!="1"){				
				sug.init("kw");
			}
		});		
	});

    require.async(["common:widget/lib/tangram/base/base.js", "common:widget/ui/log/log.js"], function(T,log){
        window.T = T;
        T.dom.ready(function(){
            var channelEls = T.dom.query(".channel a");
            T.each(channelEls, function(item, key) {
                var logParams = T.dom.getAttr(item, 'log');
                if (logParams) {
                    T.on(item, 'mousedown', function(ev) {
                        var logJson = T.json.parse("({"+logParams+"})");
                        log.imageReq("http://jingyan.baidu.com/static/article/ui/log/log.gif?type=top_tab_click&menu="+ logJson['menu'] +"&t=" + (new Date()).getTime());
                    });
                }
            });
        });
    });
}();
!function(){    require.async(["common:widget/lib/tangram/base/base.js", "common:widget/nav/nav.js"], function(T, nav){
        var hiddenCategoryId = "category-list-e";
        T.dom.ready(function(){
            nav.init();
        });
    });
}();
!function(){	require.async(["common:widget/lib/tangram/base/base.js", "article:widget/exp-title/exp-title.js"], function(T, title){
		T.dom.ready(function(){
			if(T.dom.g("ver-edt")){
				T.event.on("ver-edt","click",function(event){
					title.editNewVersion(F.context("eid"));
					T.event.stop(event);
				});
			}
        });
	});
}();
!function(){    require.async(["common:widget/lib/tangram/base/base.js", "article:widget/thumbs/thumbs.js"],function(T, thumbs){
        T.dom.ready(function(){
            thumbs.init();
        });
    });
}();
!function(){     require.async('article:widget/ui/auto-app/auto-app.js', function(app){
        app.init('Centos如何设置IP地址,LINUX怎么修改IP地址','centosiplinuxip');
     })
}();
!function(){    require.async(["common:widget/lib/tangram/base/base.js", "article:widget/content/detail/detail.js", "article:widget/ui/image-lazy-loader/image-lazy-loader.js"],function(T, detail, imageLazyLoader){
        T.dom.ready(function(){
            detail.init();
            //图片延迟加载
            new imageLazyLoader({
                imgCls : "lazy-load-img",
                container : "exp-detail"
            });
        });
    });
}();
!function(){	require.async('article:widget/content/impeach/impeach.js',function(T){
		//TODO
	});
}();
!function(){    require.async(["common:widget/lib/tangram/base/base.js", "article:widget/bottom-buttons/bottom-buttons.js"], function(T, feedback){
    T.dom.ready(function(){
            //有用和收藏
            feedback.init("useful-exp", "favor-exp", 0);

            T.on('toggle-comment','mouseover',function(){
                T.addClass(this, 'hovered');
            });
            T.on('toggle-comment','mouseout',function(){
                T.removeClass(this, 'hovered');
            });
        });
    });
}();
!function(){	require.async(['common:widget/lib/tangram/base/base.js', 'article:widget/feedback/feedback.js'], function(T, feedback){
		T.dom.ready(function(){
			feedback.initUsefull();
			feedback.initFavor();
			feedback.initJoinmag();
		});
	});
}();
!function(){	require.async(["common:widget/ui/user/introduction/introduction.js", "common:widget/ui/user/resume/resume.js", "common:widget/lib/tangram/base/base.js", "article:widget/author/author.js", "article:widget/ui/image-lazy-loader/image-lazy-loader.js"],function(intro,resume,T,author){
		T.dom.ready(function(){
			if(T.dom.g("modify-resume")){
				resume.init("modify-resume");
			}
			author.initFollow("follow-user-e");
			//console.log(F.context("username"));
			//baiduHi.init(F.context("username"));
			// new imageLazyLoader({
   //              imgCls : "lazy-load-img",
   //              container : "exp-article"
   //          });
		});
	});
}();
!function(){	require.async(['common:widget/lib/tangram/base/base.js', 'article:widget/cms-banner-ads/cms-banner-ads.js'], function(T, cmsbanner){
		T.dom.ready(function(){
			cmsbanner.init();
		});
	});
}();
!function(){       require.async(["common:widget/lib/tangram/base/base.js"],function(T){
            T.dom.ready(function(){
                T.event.on(T.dom.q('tousu-address')[0],'click',function(e){
                    T.event.getTarget(e).href = "http://tousu.baidu.com/jingyan/add?link=" + window.top.location.href + "#2";
                })
            });
        });
    }();
!function(){    (function() {        
        //解决ie图片缓存闪烁问题
        try {        
            document.execCommand("BackgroundImageCache", false, true);        
        } catch(err) {}
        
        require.async(['common:widget/lib/tangram/base/base.js', 'common:widget/ui/login/login.js', 'common:widget/ui/msg/msg.js', 'common:widget/ui/top-search-box/top-search-box.js', 'common:widget/ui/log/log.js'], 
            function(T,login,msg,search,log) {
            T.dom.ready( function() {
                //初始化消息
                msg.init();
                //初始化搜索框 导航栏
                search.init();
                //初始化nsclick
                log.init({
                    query : 'a',        //需要绑定的标签元素，可选，默认为a标签
                    evtType : 'mousedown'   //鼠标事件定义，可选，默认是click
                });
            });
        });

        		F.context({
            "isLogin" : 1,
            "hi": "http://hiphotos.baidu.com/exp/abpic/item/",
            "msg_income":{'stamp':'3','msg':'最低提现金额调整为100元！','link':'http://tieba.baidu.com/p/2741283298'},
            "msg_topic":[{"stamp":"2","msg":"\u6574\u4e2a\u590f\u5929\u6e05\u65b0\u5e72\u723d\u7684\u5c0f\u79d8\u5bc6\uff0c\u5c31\u5728\u8fd9\u91cc>>","link":"http:\/\/jingyan.baidu.com\/z\/deodorant\/index.html","start":"20140725","end":"20140731","log":0},{"stamp":"2","msg":"\u624b\u673a\u3001\u70e4\u7bb1\u3001\u51b0\u7bb1\u3001\u8d2d\u7269\u5361\u2026\u2026\u5956\u54c1\u592a\u591a\uff0c\u6c42\u9ad8\u624b\u8d76\u5feb\u62ff\u8d70>>","link":"http:\/\/jingyan.baidu.com\/activity\/voteacts","start":"20140715","end":"20140731","log":1}],
            "sfr": "9402538eb587675bbb418f51b49c6f97"
        });
                
        //异步接口集
        F.context({
            //与个人相关
            'submit_follow' : '/submit/follow',
            'submit_vote' : '/submit/vote',
            'submit_author' : '/submit/author',
            'submit_user' : '/submit/user',
            'submit_favor' : '/submit/favor',
            'submit_notice' : '/submit/notice',
            //公共的异步接口部分
            'common_isLogin' : '/common/isLogin',
            'common_isVersionExist' : '/common/isVersionExist',
            'common_isTitleValid' : '/common/isTitleValid',
            'common_needToTitle' : '/common/needToTitle',
            'asyncreq' : '/asyncreq',
            //评论相关
            'submit_comment' : '/submit/comment',
            'submit_feedback' : '/submit/exp'
        });
    })();
}();
!function(){    require.async(["common:widget/lib/tangram/base/base.js"], function(T){
        T.dom.ready(function(){

            T.sio.callByBrowser('http://cbjs.baidu.com/js/o.js', function(){
            	BAIDU_CLB_addOrientation('jylistid',"36");
            	BAIDU_CLB_addOrientation('jyarticleid',"2547525");

				BAIDU_CLB_fillSlotAsync("706066", "aside-pic-ads");
				BAIDU_CLB_fillSlotAsync("706067", "bottom-pic-ads");

				//重新设置图片广告的z-index值 by yangjunlong
				setTimeout(function(){
					var baidu_dan_wrapper_706066 = T.g('baidu_dan_wrapper_706066');
					if(baidu_dan_wrapper_706066){
						T.dom.setStyle(baidu_dan_wrapper_706066, 'z_index', 100);
					}
					var baidu_dan_wrapper_706067 = T.g('baidu_dan_wrapper_706067');
					if(baidu_dan_wrapper_706067){
						T.dom.setStyle(baidu_dan_wrapper_706067, 'z_index', 100);
					}
				},1000);
			});
        });
    });

    //收拢页面统计入口， by wkeke 2013/11/5
    require.async(['article:widget/ui/article-log/article-log.js'],function(articleLog){
		//article相关统计, 包含经验分成有效PV统计
		articleLog.init();
    });
      //只有格式化经验，才进行编号固定
    require.async('article:widget/ui/step-num/step-num.js',function(stepNum){
        stepNum.init();
    });
  }();
!function(){	require.async(["common:widget/lib/tangram/base/base.js", "article:widget/exp-share/exp-share.js"], function(T, expShare){
		T.dom.ready(function(){
			expShare.init();
		});
	});
}();
!function(){require.async("common:widget/blue-book-ad/blue-book-ad.js",function(bluebook){
    bluebook.init();
});
}();</script></html><!--15716229191148593162072612-->
<script> var _trace_page_logid = 1571622919; </script>